home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
timetrak
/
ttrak.frm
< prev
next >
Wrap
Text File
|
1995-09-06
|
12KB
|
437 lines
VERSION 2.00
Begin Form ttrak
BackColor = &H00C0C0C0&
Caption = "Project Time Tracking"
ClientHeight = 4110
ClientLeft = 1380
ClientTop = 1230
ClientWidth = 7545
Height = 4800
Icon = TTRAK.FRX:0000
Left = 1320
LinkMode = 1 'Source
LinkTopic = "Form1"
ScaleHeight = 4110
ScaleWidth = 7545
Top = 600
Width = 7665
Begin CommandButton printbtn
Caption = "Print"
Height = 315
Left = 1950
TabIndex = 18
Top = 3675
Width = 3540
End
Begin CommandButton exitbtn
Caption = "EXIT"
Height = 495
Left = 840
TabIndex = 6
Top = 2880
Width = 1575
End
Begin CommandButton delbtn
Caption = "DELETE"
Height = 495
Left = 840
TabIndex = 5
Top = 2160
Width = 1575
End
Begin CommandButton addbtn
Caption = "ADD"
Default = -1 'True
Height = 495
Left = 840
TabIndex = 4
Top = 1440
Width = 1575
End
Begin ComboBox project
BackColor = &H0000FFFF&
ForeColor = &H00FF0000&
Height = 300
Left = 600
TabIndex = 0
Text = " "
Top = 720
Width = 2415
End
Begin Frame Frame1
BackColor = &H00C0C0C0&
Caption = "information"
Height = 1695
Left = 3720
TabIndex = 8
Top = 120
Width = 3135
Begin TextBox who
BackColor = &H0000FFFF&
ForeColor = &H00FF0000&
Height = 285
Left = 1680
TabIndex = 3
Text = " "
Top = 1200
Width = 975
End
Begin TextBox workdate
BackColor = &H0000FFFF&
ForeColor = &H00FF0000&
Height = 285
Left = 1680
TabIndex = 2
Text = " "
Top = 840
Width = 975
End
Begin TextBox hours
BackColor = &H0000FFFF&
ForeColor = &H00FF0000&
Height = 285
Left = 1680
TabIndex = 1
Text = " "
Top = 480
Width = 975
End
Begin Label Label4
BackColor = &H00C0C0C0&
Caption = "Who"
Height = 255
Left = 480
TabIndex = 11
Top = 1200
Width = 615
End
Begin Label Label3
BackColor = &H00C0C0C0&
Caption = "Date"
Height = 255
Left = 480
TabIndex = 10
Top = 840
Width = 615
End
Begin Label Label2
BackColor = &H00C0C0C0&
Caption = "Hours"
Height = 255
Left = 480
TabIndex = 9
Top = 480
Width = 735
End
End
Begin Label tothours
BackColor = &H0000FFFF&
BorderStyle = 1 'Fixed Single
Caption = " "
ForeColor = &H000000FF&
Height = 375
Left = 5520
TabIndex = 15
Top = 3000
Width = 1215
End
Begin Label Label5
BackColor = &H00C0C0C0&
Caption = "Total Hours"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Serif"
FontSize = 13.5
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 3600
TabIndex = 12
Top = 3000
Width = 1695
End
Begin Label totentry
BackColor = &H0000FFFF&
BorderStyle = 1 'Fixed Single
Caption = " "
ForeColor = &H000000FF&
Height = 375
Left = 5520
TabIndex = 17
Top = 2520
Width = 1215
End
Begin Label Label7
BackColor = &H00C0C0C0&
Caption = "Total Entries"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Serif"
FontSize = 13.5
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 3600
TabIndex = 16
Top = 2520
Width = 1815
End
Begin Label lastdate
BackColor = &H0000FFFF&
BorderStyle = 1 'Fixed Single
Caption = " "
ForeColor = &H000000FF&
Height = 375
Left = 5520
TabIndex = 14
Top = 2040
Width = 1215
End
Begin Label Label6
BackColor = &H00C0C0C0&
Caption = "Last Entry"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Serif"
FontSize = 13.5
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 375
Left = 3600
TabIndex = 13
Top = 2025
Width = 1575
End
Begin Label Label1
BackColor = &H00C0C0C0&
Caption = "Project"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Serif"
FontSize = 18
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 495
Left = 960
TabIndex = 7
Top = 120
Width = 1335
End
Begin Menu about
Caption = "&About..."
End
End
Dim savproj As String
Dim savhours As Long
Dim recnbr As Long
Sub about_Click ()
ttrakabt.Show
End Sub
Sub addbtn_Click ()
If project.text = "" Then
rc = MsgBox("Must enter Project Name", 48, "Warning")
Exit Sub
End If
If Get_Header() = PXERR_RECNOTFOUND Then
Create_Header 1
End If
lValue = Val(hours.text)
savhours = savhours + lValue
recnbr = recnbr + 1
Put_Header savhours, recnbr
Put_Record
tothours.caption = Str$(savhours)
lastdate.caption = workdate.text
totentry.caption = Str$(recnbr)
End Sub
Sub Create_Header (addflag As Integer) 'if 1 then add to project list
aValue = project.text
PutField ttrakRec, 1, "A"
lValue = 0
PutField ttrakRec, 2, "N"
aValue = "HDR"
PutField ttrakRec, 5, "A"
lValue = 0
PutField ttrakRec, 4, "N"
recnbr = 0
lValue = 0
PutField ttrakRec, 6, "N"
rc = PXRecAppend(ttrakTbl, ttrakRec)
PXError
If addflag = 1 Then
newproj$ = project.text
project.AddItem newproj$
End If
End Sub
Sub delbtn_Click ()
Dim dkey1 As String * 20
Dim dkey2 As Int